package com.bobo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bobo.base.PageParam;
import com.bobo.mapper.ProdMapper;
import com.bobo.pojo.Prod;
import com.bobo.pojo.ProdTag;
import com.bobo.service.ProdService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProdServiceImpl  extends ServiceImpl<ProdMapper, Prod> implements ProdService {
    @Resource
    private ProdMapper prodMapper;


    @Override
    public IPage<Prod> pageByTagId(Page<Prod> page, Long tagId) {
        return prodMapper.pageByTagId(page, tagId);
    }

    @Override
    public IPage<Prod> pageByCategoryId(PageParam<Prod> page, Long categoryId) {
        return prodMapper.pageByCategoryId(page, categoryId);
    }

    @Override
    public List<ProdTag> tagProdList() {
        return prodMapper.tagProdList();
    }

    @Override
    public Prod getProductByProdId(Long prodId) {
        return null;
    }
}
